//
//  ShakePost.m
//  JiaoX
//
//  Created by yinqy on 15/4/22.
//  Copyright (c) 2015年 北京娇羞科技有限公司. All rights reserved.
//

#import "ShakePost.h"

@implementation ShakePost

-(void)setShake:(Shake *)shake{
    _shake = shake;
    [self setCornerRadius:5 borderWidth:0 borderColor:nil];
    [self.enterBtn setBackgroundImage:[UIImage imageWithColor:JXThemeColor] forState:UIControlStateNormal];
    [self.enterBtn setCornerRadius:2.5 borderWidth:0 borderColor:nil];
    [self.postImage sd_setImageWithURL:[NSURL URLWithString:shake.shakeImg]];
    [self.postTitle setText:shake.shakeName];

    [self.enterBtn addTarget:self action:@selector(enterBtnClick:) forControlEvents:UIControlEventTouchUpInside];
}

-(void)enterBtnClick:(UIButton *)btn{
    if (self.operation) {
        self.operation();
    }
}

@end
